package com.sgm.controller;

import com.sgm.manager.DomeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "dome")
public class DomeController {
    private final static Logger LOGGER = LoggerFactory.getLogger(DomeController.class);

    @Autowired
    private DomeManager domeManager;


    @RequestMapping(value = "hello", method = RequestMethod.GET)
    public String hello(@RequestParam("name") String name) {
        LOGGER.info("输入日志");
        return this.domeManager.test(name);
    }

    @RequestMapping(value = "helloc", method = RequestMethod.GET)
    public String helloC() {
        LOGGER.info("输入日志C");
        return this.domeManager.test();
    }
}
